var path=require('path');
//文件路径分隔符
console.log(path.sep);
//平台分隔符
console.log(path.delimiter);

var test="/test/test1//2slashes/1slash/tab/..";
console.log('normalization:'+path.normalize(test));

console.log('joint path:'+path.join('aa','bb/cc','...'));

//绝对路径
console.log('resolve:'+path.resolve('mod_path.js'));
//获取后缀名
console.log('ext name: '+path.extname('mod_path.js'));
var pp=path.parse(path.resolve('mod_path.js'));
console.log("path is ",pp);